package com.thenmoret.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.thenmoret.mapper.ArtImgMapper;
import com.thenmoret.pojo.ArtImg;
import com.thenmoret.service.ArticleImgService;
@Service
public class ArticleImgServiceImpl implements ArticleImgService{

	@Autowired
	private ArtImgMapper artImgMapper;
	
	@Override
	public Integer saveArtImg(ArtImg artImg) {
		return artImgMapper.insert(artImg);
	}

	@Override
	public Integer deleteArtImg(ArtImg artImg) {
		return artImgMapper.deleteByPrimaryKey(artImg.getImgId());
	}

	@Override
	public Integer editorArtImg(ArtImg artImg) {
		return artImgMapper.updateByPrimaryKey(artImg);
	}

	@Override
	public List<ArtImg> AIList() {
		return artImgMapper.selectByList();
	}

}
